﻿using Nest;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Wicture.EPC.OnlineQueryProxy.Models.ES
{
    /// <summary>
    /// 查询基础对象
    /// </summary>
    public class ESQueryRequest
    {
        /// <summary>
        /// 索引名称
        /// </summary>
        public IndexName[] Indexs { get; set; }
        /// <summary>
        /// 索引类型
        /// </summary>
        public TypeName[] Types { get; set; }
        /// <summary>
        /// 偏移量
        /// </summary>
        public int From { get; set; }
        /// <summary>
        /// 页大小
        /// </summary>
        public int Size { get; set; }
        /// <summary>
        /// 查询条件
        /// </summary>
        public QueryContainer QueryContainer { get; set; }
        /// <summary>
        /// 聚合条件
        /// </summary>
        public AggregationDictionary Aggregation { get; set; }
        /// <summary>
        /// 排序条件
        /// </summary>
        public List<ISort> Sorts { get; set; }
        /// <summary>
        /// 路由值
        /// </summary>
        public string[] Routing { get; set; }
    }

}
